package cn.antsing.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class User3 {
    private ApplicationContext applicationContext;

    @Autowired
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public void printApplicationContext() {
        System.out.println("-----user3----:\t" + applicationContext.getClass().getName() + "\t" + applicationContext.toString());
    }
}
